#ifndef CLIENTWINDOW_H
#define CLIENTWINDOW_H

#include <QMainWindow>
#include <QTcpSocket>
#include <QTimer>
#include <opencv2/opencv.hpp>

QT_BEGIN_NAMESPACE
namespace Ui { class ClientWindow; }
QT_END_NAMESPACE

class ClientWindow : public QMainWindow {
    Q_OBJECT

public:
    ClientWindow(QWidget *parent = nullptr);
    ~ClientWindow();

private slots:
    void loadVideo();
    void connectToServer();
    void updateFrame();
    void readSocket();

private:
    Ui::ClientWindow *ui;
    QTcpSocket *socket;
    cv::VideoCapture cap;
    QTimer *timer;
    cv::Mat frame;
};

#endif // CLIENTWINDOW_H
